package com.jereh.zk.oa.interceptor;

import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;

public class TimerInterceptor extends AbstractInterceptor {

	@Override
	public String intercept(ActionInvocation invocation) throws Exception {
		Long startTime=System.currentTimeMillis();
		String ret=invocation.invoke();
		Long endTime=System.currentTimeMillis();
		System.out.println(endTime-startTime);
		return ret;
	}

}
